<!--
 * @Description: 输入框
 * @Author: zhangwei
 * @Date: 2023-02-02 16:25:48
 * @LastEditTime: 2023-02-20 17:59:24
 * @LastEditors: zhangwei v-model="formObj[mdata.key]"
 1. 表单组件有2个地方用到，一个是在属性编辑，一个本身拖拽到编辑区域，2个不同的地方在于
-->
<template>
  <el-form-item :label="mdata.attrs.label" :prop="mdata.key">
    <el-input v-bind="mdata.attrs" v-model="formObj[mdata.key]"></el-input>
  </el-form-item>
</template>

<script lang="ts" setup name="DInput">
import type { PropType } from "vue";
import type { TypeCmpProtocal } from "@/types/TypeDesign";

var props = defineProps({
  mdata: {
    type: Object as PropType<TypeCmpProtocal>,
    default: () => {},
  },
  formObj: {
    type: Object,
    default: () => {
      return {
        value: "",
      };
    },
  },
});
</script>

<style scoped lang="scss"></style>
